<%@page import="java.util.ArrayList"%>
<%@page import="java.util.Date"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Calendar"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	Calendar calendar=Calendar.getInstance();
	calendar.set(Calendar.YEAR, 2015);
	calendar.set(Calendar.MONTH, Calendar.NOVEMBER);
	calendar.set(Calendar.DAY_OF_MONTH, 1);
	calendar.set(Calendar.HOUR_OF_DAY, 0);
	calendar.set(Calendar.MINUTE, 0);
	calendar.set(Calendar.SECOND, 0);
	Date dateMin=calendar.getTime();
	
	Calendar cal=Calendar.getInstance();
	List<Date> dateList=new ArrayList<Date>();
	for(int i=0;i<12;i++)
	{
		if(cal.getTime().after(dateMin))
		{
			dateList.add(cal.getTime());
		}
		cal.add(Calendar.MONTH, -1);
	}
	request.setAttribute("dateList", dateList);
%>
<div class="line-big">
	<div class="xl3">
		<div class="panel">
			<div class="panel-head">
				<strong>商品信息表</strong>
			</div>
			<ul class="list-group">
				<li>
					<span class="float-right"><a target="_blank" href='file/goods_export_record.xlsx'>
							<span class="icon-download"></span>
						</a></span><span class="icon-file-text"></span>
					<a href="javascript:void(0)"> 下载所有商品信息表</a>
				</li>
			</ul>
		</div>
	</div>
	<div class="xl3">
		<div class="panel">
			<div class="panel-head">
				<strong>商品退换货信息表</strong>
			</div>
			<ul class="list-group">
				<c:forEach items="${ dateList}" var="dTemp">
					<li>
						<span class="float-right"><a target="_blank" href='file/report/order_return_export_report_<fmt:formatDate value="${dTemp}" pattern="yyyy-MM" />.xlsx'>
								<span class="icon-download"></span>
							</a></span><span class="icon-file-text"></span>
						<a href="javascript:void(0)">
							<fmt:formatDate value="${dTemp}" pattern="yyyy年MM月" />
						</a>
					</li>
				</c:forEach>
			</ul>
		</div>
	</div>
	<div class="xl3">
		<div class="panel">
			<div class="panel-head">
				<strong>订单信息表</strong>
			</div>
			<ul class="list-group">
				<c:forEach items="${ dateList}" var="dTemp">
					<li>
						<span class="float-right"><a target="_blank" href='file/report/order_export_report_<fmt:formatDate value="${dTemp}" pattern="yyyy-MM" />.xlsx'>
								<span class="icon-download"></span>
							</a></span><span class="icon-file-text"></span>
						<a href="javascript:void(0)">
							<fmt:formatDate value="${dTemp}" pattern="yyyy年MM月" />
						</a>
					</li>
				</c:forEach>
			</ul>
		</div>
	</div>
	<div class="xl3">
		<div class="panel">
			<div class="panel-head">
				<strong>商品销售数量月汇总表</strong>
			</div>
			<ul class="list-group">
				<c:forEach items="${ dateList}" var="dTemp">
					<li>
						<span class="float-right"><a target="_blank" href='file/report/goods_sales_summary_export_report_<fmt:formatDate value="${dTemp}" pattern="yyyy-MM" />.xlsx'>
								<span class="icon-download"></span>
							</a></span><span class="icon-file-text"></span>
						<a href="javascript:void(0)">
							<fmt:formatDate value="${dTemp}" pattern="yyyy年MM月" />
						</a>
					</li>
				</c:forEach>
			</ul>
		</div>
	</div>
</div>
<div class="line-big G-MarginTop20">
	<div class="xl3">
		<div class="panel">
			<div class="panel-head">
				<strong>佣金明细信息表</strong>
			</div>
			<ul class="list-group">
				<c:forEach items="${ dateList}" var="dTemp">
					<li>
						<span class="float-right"><a target="_blank" href='file/report/commission_detail_export_report_<fmt:formatDate value="${dTemp}" pattern="yyyy-MM" />.xlsx'>
								<span class="icon-download"></span>
							</a></span><span class="icon-file-text"></span>
						<a href="javascript:void(0)">
							<fmt:formatDate value="${dTemp}" pattern="yyyy年MM月" />
						</a>
					</li>
				</c:forEach>
			</ul>
		</div>
	</div>
	<div class="xl3">
		<div class="panel">
			<div class="panel-head">
				<strong>佣金信息汇总表</strong>
			</div>
			<ul class="list-group">
				<c:forEach items="${ dateList}" var="dTemp">
					<li>
						<span class="float-right"><a target="_blank" href='file/report/commission_summary_export_report_<fmt:formatDate value="${dTemp}" pattern="yyyy-MM" />.xlsx'>
								<span class="icon-download"></span>
							</a></span><span class="icon-file-text"></span>
						<a href="javascript:void(0)">
							<fmt:formatDate value="${dTemp}" pattern="yyyy年MM月" />
						</a>
					</li>
				</c:forEach>
			</ul>
		</div>
	</div>
	<div class="xl3">
		<div class="panel">
			<div class="panel-head">
				<strong>买家信息表</strong>
			</div>
			<ul class="list-group">
				<c:forEach items="${ dateList}" var="dTemp">
					<li>
						<span class="float-right"><a target="_blank" href='file/report/buyer_export_report_<fmt:formatDate value="${dTemp}" pattern="yyyy-MM" />.xlsx'>
								<span class="icon-download"></span>
							</a></span><span class="icon-file-text"></span>
						<a href="javascript:void(0)">
							<fmt:formatDate value="${dTemp}" pattern="yyyy年MM月" />
						</a>
					</li>
				</c:forEach>
			</ul>
		</div>
	</div>
</div>
<script type="text/javascript">
	
</script>
